script(charset="utf-8", src="#{options.cdn_path}/kindeditor/kindeditor-min.js?v=#{options.site_version}")
script(charset="utf-8", src="#{options.cdn_path}/kindeditor/lang/zh_CN.js?v=#{options.site_version}")
script(charset="utf-8", src="#{options.cdn_path}/kindeditor/plugins/code/prettify.js?v=#{options.site_version}")
script(charset="utf-8")
    var editor;
    KindEditor.ready(function(K) {
        editor = K.create('#editor', {
            width : '98%',
            height : '240px',
            resizeType : 1,
            cssPath : '#{options.cdn_path}/kindeditor/plugins/code/prettify.css?v=#{options.site_version}',
            uploadJson : '/admin/editor',
            allowPreviewEmoticons : false,
            allowImageUpload : true,
            items : [
                'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
                'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', '|',
                'subscript', 'superscript', 'clearhtml', 'quickformat', 'selectall', 'source', '/',
                'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
                'flash', 'media', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
                'anchor', 'link', 'unlink', '|', 'about', 'fullscreen'
            ],
            afterCreate : function() { 
                this.sync(); 
            }, 
            afterBlur:function(){ 
                this.sync(); 
            }
        });
    });


